package com.guigu.pd.serviceapi.omsfeign;

import com.guigu.pd.serviceapi.pojo.OrderEntity;
import com.guigu.pd.serviceapi.pojo.OrderLocationEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Date;
import java.util.List;

@FeignClient(value = "pd-oms",path = "/oms/order")
public interface OrderFeign {

    @GetMapping("/getsendorderbyid/{id}")
    public String getsendorderbyId(@PathVariable("id") String id);

    @GetMapping("/getreceivorderbyid/{id}")
    public String getreceivorderbyId(@PathVariable("id") String id);

    @GetMapping("/getordertimebyid/{id}")
    public Date getordertimebyId(@PathVariable("id") String id);

    @GetMapping("/getorderbyid/{id}")
    public String getroderbyId(@PathVariable("id") String id);

    @GetMapping("/getbysendname/{sname}")
    public String getbySendname(@PathVariable("sname") String sname);

    @GetMapping("/getbysendaddress/{saddress}")
    public String getbySendaddress(@PathVariable("saddress") String saddress);

    @GetMapping("/getbyreceivername/{rname}")
    public String getbyReceivername(@PathVariable("rname") String rname);

    @GetMapping("/getbyreceiveraddress/{raddress}")
    public String getbyReceiveraddress(@PathVariable("raddress") String raddress);

    @GetMapping("/gettimebyid/{orderid}")
    public Date gettimebyId(@PathVariable("orderid")String orderid);

    @GetMapping("/getbysendphone/{sphone}")
    public String getbySendphone(@PathVariable("sphone") String sphone);

    @GetMapping("/getbyreceiverphone/{rphone}")
    public String getbyReceiverphone(@PathVariable("rphone") String rphone);

    @GetMapping("/getorderinfobyid/{id}")
    public OrderEntity getroderinfobyId(@PathVariable("id") String id);

    //先根据机构id 和 状态 3已揽件 获取订单表数据
    @GetMapping("/getorderxxbycurrentAgencyId/{id}")
    public List<OrderEntity> getorderxxbycurrentAgencyId(@PathVariable("id") String id);

    //根据订单id 去 、 获取该订单收货网点id
    @GetMapping("/getOrderLocationEntitybyorderId/{id}")
    public OrderLocationEntity getOrderLocationEntitybyorderId(@PathVariable("id") String id);


    //修改订单状态为4
    @GetMapping("/updatestatus/{id}")
     boolean updatestatus(@PathVariable("id") String id);
}
